Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix react-frame-component by supporting nullish portals #3896

Merged
merged 8 commits into from
Jul 11, 2023

Conversation

JoviDeCroock
Copy link
Member

fixes #2653

This allows for nullish portals

@coveralls
Copy link

coveralls commented Feb 15, 2023

Coverage Status

coverage: 99.561%. remained the same when pulling db7bbd4 on fix-for-frame-component into 051f10c on master.

@github-actions
Copy link

github-actions bot commented Feb 15, 2023

Size Change: -31 B (0%)

Total Size: 57 kB

Filename Size Change
compat/dist/compat.js 3.91 kB -11 B (0%)
compat/dist/compat.module.js 3.83 kB -11 B (0%)
compat/dist/compat.umd.js 3.97 kB -9 B (0%)
ℹ️ View Unchanged
Filename Size Change
debug/dist/debug.js 3.64 kB 0 B
debug/dist/debug.module.js 3.62 kB 0 B
debug/dist/debug.umd.js 3.71 kB 0 B
devtools/dist/devtools.js 232 B 0 B
devtools/dist/devtools.module.js 241 B 0 B
devtools/dist/devtools.umd.js 315 B 0 B
dist/preact.js 4.35 kB 0 B
dist/preact.min.js 4.38 kB 0 B
dist/preact.min.module.js 4.38 kB 0 B
dist/preact.min.umd.js 4.4 kB 0 B
dist/preact.module.js 4.37 kB 0 B
dist/preact.umd.js 4.41 kB 0 B
hooks/dist/hooks.js 1.53 kB 0 B
hooks/dist/hooks.module.js 1.56 kB 0 B
hooks/dist/hooks.umd.js 1.62 kB 0 B
jsx-runtime/dist/jsxRuntime.js 360 B 0 B
jsx-runtime/dist/jsxRuntime.module.js 326 B 0 B
jsx-runtime/dist/jsxRuntime.umd.js 441 B 0 B
test-utils/dist/testUtils.js 453 B 0 B
test-utils/dist/testUtils.module.js 454 B 0 B
test-utils/dist/testUtils.umd.js 536 B 0 B

compressed-size-action

// When we come from a conditional render, on a mounted
// portal we should clear the DOM.
else if (_this._temp) {
if (!props._vnode && _this._temp) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can just remove this condition and the this.unmount call now. When a null vnode is received, we will render the provider with null as it's only child, which produces the same result as calling unmount (because there is no componentDidUnmount method on this provider).

@developit
Copy link
Member

LGTM but I'd like to check if we can remove that condition entirely.

compat/src/portals.js Outdated Show resolved Hide resolved
@JoviDeCroock
Copy link
Member Author

Closing due to inactivity

@JoviDeCroock JoviDeCroock deleted the fix-for-frame-component branch April 24, 2023 10:41
@JoviDeCroock JoviDeCroock restored the fix-for-frame-component branch May 19, 2023 15:47
@JoviDeCroock JoviDeCroock reopened this May 19, 2023
@JoviDeCroock JoviDeCroock merged commit e16b520 into master Jul 11, 2023
@JoviDeCroock JoviDeCroock deleted the fix-for-frame-component branch July 11, 2023 05:47
@JoviDeCroock JoviDeCroock mentioned this pull request Aug 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Preact doesn't work with react-frame-component
5 participants